import sys
from osgeo import gdal
version = gdal.VersionInfo("VERSION_NUMBER")
sys.exit(version)